#include<iostream>
int main()
{
  int cuval=0,val=0;
  if(std::cin>>cuval) 
  {
      int cnt=1;
  while(std::cin>>val)
  {
      if(val==cuval)
      ++cnt;
    else {
      
        std::cout << cuval << " occurs " << cnt << " times " << std::endl;
				cuval = val;
				cnt = 1;
    }
  }

  }
  return 0;
  
}